#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>

class QListWidgetItem;
QT_BEGIN_NAMESPACE
namespace Ui {
class Widget;
}
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
    QString buildFFmpegCommand(const QString &ffmpegPath, const QString &inputFile,
                             const QString &options, const QString &outputFile);

    static QString getFFmpegPath();


private:
    Ui::Widget *ui;

    QMap<QString, QString> optionHelp;
    void initOptionHelp();
    void showOptionHelp();

    void highlightEmptyInput();
    void resetInputStyle();
    QTimer* flashTimer;
    int flashCount;


private slots:
    void on_inputDirButton_clicked();
    void on_inputFileButton_clicked();
    void on_outputDirButton_clicked();
    void on_runButton_clicked();
    void on_videoOptionsList_itemClicked(QListWidgetItem *item);
    void on_audioOptionsList_itemClicked(QListWidgetItem *item);
    void on_imageOptionsList_itemClicked(QListWidgetItem *item);
    void on_outputOptionsEdit_textChanged();
    void on_fileTypeCombo_currentIndexChanged(int index);
};
#endif // WIDGET_H
